-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HSEARCH-4674 Use test containers #3796
HSEARCH-4674 Use test containers #3796
Conversation
d212435
to
8f99544
Compare
Added a test containers BOM and a couple of comments. aaand converting it from the draft 😃 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, here are a few comments.
On the static
containers... it's not a hard no, I just feel uncomfortable with something that is so widely frowned upon. If this is standard practice when using test containers, then so be it. But I'd really have felt safer with a solution leveraging JUnit contexts where possible.
...c/main/java/org/hibernate/search/util/impl/integrationtest/mapper/orm/DatabaseContainer.java
Outdated
Show resolved
Hide resolved
integrationtest/java/modules/orm-elasticsearch/src/main/resources/actual-hibernate.properties
Outdated
Show resolved
Hide resolved
integrationtest/java/modules/orm-elasticsearch/src/main/resources/actual-hibernate.properties
Outdated
Show resolved
Hide resolved
...c/main/java/org/hibernate/search/util/impl/integrationtest/mapper/orm/DatabaseContainer.java
Show resolved
Hide resolved
.../src/main/java/org/hibernate/search/util/impl/integrationtest/mapper/orm/OrmSetupHelper.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some notes about properties mentioned in CONTRIBUTING.md.
...va/org/hibernate/search/util/impl/integrationtest/backend/elasticsearch/SearchContainer.java
Outdated
Show resolved
Hide resolved
8f99544
to
0fd2fe8
Compare
There're more changes to come ... I just wanted to test Ruyk on CI 🙈 😃. |
c78d01c
to
177dd6e
Compare
...c/main/java/org/hibernate/search/util/impl/integrationtest/mapper/orm/DatabaseContainer.java
Show resolved
Hide resolved
...lper/orm/src/test/java/org/hibernate/search/test/batchindexing/DatabaseMultitenancyTest.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall, here are my latest comments...
Did you check how execution time compares to what we had previously with docker-maven-plugin?
ddbb3ad
to
0da07c6
Compare
the execution time is more or less the same compared to the maven docker plugin:
I'll take a look at Oracle tests and why it took that much longer: But since previous builds show a time close to 3 min, maybe it's just the change from XE to FREE version of the Oracle container... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh my, I just tried from the IDE: I just change the version in the Jenkinsfile Dockerfile (obviously), run the test and BOOM: a container gets started automatically with the right version. It's awesome.
I added a few comments below, could you please process them?
I also pushed a commit to your branch. The changes are very minor, but please take care to keep it when you rebase :)
Then once you're done rebasing on main (there's a conflict), and maybe after you've squashed a few commits if it makes sense, feel free to merge :)
...hibernate/search/util/impl/integrationtest/backend/elasticsearch/SearchBackendContainer.java
Show resolved
Hide resolved
...hibernate/search/util/impl/integrationtest/backend/elasticsearch/SearchBackendContainer.java
Outdated
Show resolved
Hide resolved
83ab4f6
to
b43bcf0
Compare
- remove some unused/redundant config properties - make use of @DynamicPropertySource - make use of `Persistence.createEntityManagerFactory` with properties - make use of `SystemHelper.setSystemProperty`
7d9faad
to
777c47f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, please go ahead and squash/fixup what's needed and merge!
Thanks for all this :)
777c47f
to
3717b39
Compare
…itHub Actions workflows
f12b629
to
9860481
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
https://hibernate.atlassian.net/browse/HSEARCH-4674
the testcontainer+dockerfile+dependabot combination seems to work 🙈 😃
Here're a few PRs opened for DB updates:
marko-bekhta#190
marko-bekhta#188
while I was testing it on my repo I've added:
we probably would need to add some secrets (as I'm not sure it works without the registry)
There's still some cleanup needed, but wanted to see if this still would work on CI